Optimal. Leaf size=109 \[ -\frac {(c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \csc (a+b x)}{2 b^2}-\frac {(c+d x) \cot (a+b x) \csc (a+b x)}{2 b}+\frac {i d \text {Li}_2\left (-e^{i (a+b x)}\right )}{2 b^2}-\frac {i d \text {Li}_2\left (e^{i (a+b x)}\right )}{2 b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {4270, 4268,
2317, 2438} \begin {gather*} \frac {i d \text {PolyLog}\left (2,-e^{i (a+b x)}\right )}{2 b^2}-\frac {i d \text {PolyLog}\left (2,e^{i (a+b x)}\right )}{2 b^2}-\frac {d \csc (a+b x)}{2 b^2}-\frac {(c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {(c+d x) \cot (a+b x) \csc (a+b x)}{2 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2317
Rule 2438
Rule 4268
Rule 4270
Rubi steps
\begin {align*} \int (c+d x) \csc ^3(a+b x) \, dx &=-\frac {d \csc (a+b x)}{2 b^2}-\frac {(c+d x) \cot (a+b x) \csc (a+b x)}{2 b}+\frac {1}{2} \int (c+d x) \csc (a+b x) \, dx\\ &=-\frac {(c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \csc (a+b x)}{2 b^2}-\frac {(c+d x) \cot (a+b x) \csc (a+b x)}{2 b}-\frac {d \int \log \left (1-e^{i (a+b x)}\right ) \, dx}{2 b}+\frac {d \int \log \left (1+e^{i (a+b x)}\right ) \, dx}{2 b}\\ &=-\frac {(c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \csc (a+b x)}{2 b^2}-\frac {(c+d x) \cot (a+b x) \csc (a+b x)}{2 b}+\frac {(i d) \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{i (a+b x)}\right )}{2 b^2}-\frac {(i d) \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{i (a+b x)}\right )}{2 b^2}\\ &=-\frac {(c+d x) \tanh ^{-1}\left (e^{i (a+b x)}\right )}{b}-\frac {d \csc (a+b x)}{2 b^2}-\frac {(c+d x) \cot (a+b x) \csc (a+b x)}{2 b}+\frac {i d \text {Li}_2\left (-e^{i (a+b x)}\right )}{2 b^2}-\frac {i d \text {Li}_2\left (e^{i (a+b x)}\right )}{2 b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(292\) vs. \(2(109)=218\).
time = 1.23, size = 292, normalized size = 2.68 \begin {gather*} -\frac {d x \csc ^2\left (\frac {a}{2}+\frac {b x}{2}\right )}{8 b}-\frac {c \csc ^2\left (\frac {1}{2} (a+b x)\right )}{8 b}-\frac {c \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )}{2 b}+\frac {c \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )}{2 b}+\frac {d \left ((a+b x) \left (\log \left (1-e^{i (a+b x)}\right )-\log \left (1+e^{i (a+b x)}\right )\right )-a \log \left (\tan \left (\frac {1}{2} (a+b x)\right )\right )+i \left (\text {Li}_2\left (-e^{i (a+b x)}\right )-\text {Li}_2\left (e^{i (a+b x)}\right )\right )\right )}{2 b^2}+\frac {d x \sec ^2\left (\frac {a}{2}+\frac {b x}{2}\right )}{8 b}+\frac {c \sec ^2\left (\frac {1}{2} (a+b x)\right )}{8 b}+\frac {d \csc \left (\frac {a}{2}\right ) \csc \left (\frac {a}{2}+\frac {b x}{2}\right ) \sin \left (\frac {b x}{2}\right )}{4 b^2}-\frac {d \sec \left (\frac {a}{2}\right ) \sec \left (\frac {a}{2}+\frac {b x}{2}\right ) \sin \left (\frac {b x}{2}\right )}{4 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 245 vs. \(2 (93 ) = 186\).
time = 0.05, size = 246, normalized size = 2.26
method | result | size |
risch | \(\frac {d x b \,{\mathrm e}^{3 i \left (b x +a \right )}+c b \,{\mathrm e}^{3 i \left (b x +a \right )}+d x b \,{\mathrm e}^{i \left (b x +a \right )}+c b \,{\mathrm e}^{i \left (b x +a \right )}-i d \,{\mathrm e}^{3 i \left (b x +a \right )}+i d \,{\mathrm e}^{i \left (b x +a \right )}}{b^{2} \left ({\mathrm e}^{2 i \left (b x +a \right )}-1\right )^{2}}-\frac {c \arctanh \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}+\frac {d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{2 b}+\frac {d \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{2 b^{2}}-\frac {i d \polylog \left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{2 b^{2}}-\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{2 b}-\frac {d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a}{2 b^{2}}+\frac {i d \polylog \left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{2 b^{2}}+\frac {d a \arctanh \left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}\) | \(246\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 763 vs. \(2 (89) = 178\).
time = 0.44, size = 763, normalized size = 7.00 \begin {gather*} -\frac {2 \, {\left (b d x + b c + {\left (b d x + b c\right )} \cos \left (4 \, b x + 4 \, a\right ) - 2 \, {\left (b d x + b c\right )} \cos \left (2 \, b x + 2 \, a\right ) - {\left (-i \, b d x - i \, b c\right )} \sin \left (4 \, b x + 4 \, a\right ) - 2 \, {\left (i \, b d x + i \, b c\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) + 1\right ) - 2 \, {\left (b c \cos \left (4 \, b x + 4 \, a\right ) - 2 \, b c \cos \left (2 \, b x + 2 \, a\right ) + i \, b c \sin \left (4 \, b x + 4 \, a\right ) - 2 i \, b c \sin \left (2 \, b x + 2 \, a\right ) + b c\right )} \arctan \left (\sin \left (b x + a\right ), \cos \left (b x + a\right ) - 1\right ) + 2 \, {\left (b d x \cos \left (4 \, b x + 4 \, a\right ) - 2 \, b d x \cos \left (2 \, b x + 2 \, a\right ) + i \, b d x \sin \left (4 \, b x + 4 \, a\right ) - 2 i \, b d x \sin \left (2 \, b x + 2 \, a\right ) + b d x\right )} \arctan \left (\sin \left (b x + a\right ), -\cos \left (b x + a\right ) + 1\right ) - 4 \, {\left (-i \, b d x - i \, b c - d\right )} \cos \left (3 \, b x + 3 \, a\right ) - 4 \, {\left (-i \, b d x - i \, b c + d\right )} \cos \left (b x + a\right ) - 2 \, {\left (d \cos \left (4 \, b x + 4 \, a\right ) - 2 \, d \cos \left (2 \, b x + 2 \, a\right ) + i \, d \sin \left (4 \, b x + 4 \, a\right ) - 2 i \, d \sin \left (2 \, b x + 2 \, a\right ) + d\right )} {\rm Li}_2\left (-e^{\left (i \, b x + i \, a\right )}\right ) + 2 \, {\left (d \cos \left (4 \, b x + 4 \, a\right ) - 2 \, d \cos \left (2 \, b x + 2 \, a\right ) + i \, d \sin \left (4 \, b x + 4 \, a\right ) - 2 i \, d \sin \left (2 \, b x + 2 \, a\right ) + d\right )} {\rm Li}_2\left (e^{\left (i \, b x + i \, a\right )}\right ) + {\left (-i \, b d x - i \, b c + {\left (-i \, b d x - i \, b c\right )} \cos \left (4 \, b x + 4 \, a\right ) - 2 \, {\left (-i \, b d x - i \, b c\right )} \cos \left (2 \, b x + 2 \, a\right ) + {\left (b d x + b c\right )} \sin \left (4 \, b x + 4 \, a\right ) - 2 \, {\left (b d x + b c\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} + 2 \, \cos \left (b x + a\right ) + 1\right ) + {\left (i \, b d x + i \, b c + {\left (i \, b d x + i \, b c\right )} \cos \left (4 \, b x + 4 \, a\right ) - 2 \, {\left (i \, b d x + i \, b c\right )} \cos \left (2 \, b x + 2 \, a\right ) - {\left (b d x + b c\right )} \sin \left (4 \, b x + 4 \, a\right ) + 2 \, {\left (b d x + b c\right )} \sin \left (2 \, b x + 2 \, a\right )\right )} \log \left (\cos \left (b x + a\right )^{2} + \sin \left (b x + a\right )^{2} - 2 \, \cos \left (b x + a\right ) + 1\right ) - 4 \, {\left (b d x + b c - i \, d\right )} \sin \left (3 \, b x + 3 \, a\right ) - 4 \, {\left (b d x + b c + i \, d\right )} \sin \left (b x + a\right )}{-4 i \, b^{2} \cos \left (4 \, b x + 4 \, a\right ) + 8 i \, b^{2} \cos \left (2 \, b x + 2 \, a\right ) + 4 \, b^{2} \sin \left (4 \, b x + 4 \, a\right ) - 8 \, b^{2} \sin \left (2 \, b x + 2 \, a\right ) - 4 i \, b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 452 vs. \(2 (89) = 178\).
time = 0.38, size = 452, normalized size = 4.15 \begin {gather*} \frac {2 \, {\left (b d x + b c\right )} \cos \left (b x + a\right ) + {\left (-i \, d \cos \left (b x + a\right )^{2} + i \, d\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + {\left (i \, d \cos \left (b x + a\right )^{2} - i \, d\right )} {\rm Li}_2\left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) + {\left (-i \, d \cos \left (b x + a\right )^{2} + i \, d\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right )\right ) + {\left (i \, d \cos \left (b x + a\right )^{2} - i \, d\right )} {\rm Li}_2\left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right )\right ) + {\left (b d x - {\left (b d x + b c\right )} \cos \left (b x + a\right )^{2} + b c\right )} \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) + {\left (b d x - {\left (b d x + b c\right )} \cos \left (b x + a\right )^{2} + b c\right )} \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) + {\left ({\left (b c - a d\right )} \cos \left (b x + a\right )^{2} - b c + a d\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) + {\left ({\left (b c - a d\right )} \cos \left (b x + a\right )^{2} - b c + a d\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) - \frac {1}{2} i \, \sin \left (b x + a\right ) + \frac {1}{2}\right ) - {\left (b d x - {\left (b d x + a d\right )} \cos \left (b x + a\right )^{2} + a d\right )} \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + 1\right ) - {\left (b d x - {\left (b d x + a d\right )} \cos \left (b x + a\right )^{2} + a d\right )} \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + 1\right ) + 2 \, d \sin \left (b x + a\right )}{4 \, {\left (b^{2} \cos \left (b x + a\right )^{2} - b^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (c + d x\right ) \csc ^{3}{\left (a + b x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F(-1)]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \text {Hanged} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________